Skip to content

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jun 2, 2024

We only set isDynamic to true if we were inside an expression. Also set isDynamic when we are performing cursor info at an overridable declaration. This allows jump-to-definition to jump to declarations that override the one that we performed cursor info on.

rdar://128300752

@ahoppen
Copy link
Member Author

ahoppen commented Jun 2, 2024

@swift-ci Please smoke test

@@ -0,0 +1,12 @@
protocol MyProto {
// RUN: %sourcekitd-test -req=cursor -pos=%(line + 1):9 %s -- %s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forget some checks 😅?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops 😉

We only set `isDynamic` to `true` if we were inside an expression. Also set `isDynamic` when we are performing cursor info at an overridable declaration. This allows jump-to-definition to jump to declarations that override the one that we performed cursor info on.

rdar://128300752
@ahoppen ahoppen force-pushed the dynamic-cursor-info-on-decl branch from 238c1e1 to a38e7cc Compare June 2, 2024 05:59
@ahoppen
Copy link
Member Author

ahoppen commented Jun 2, 2024

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Jun 3, 2024

@swift-ci Please smoke test Linux

@ahoppen ahoppen merged commit 2e3d42e into swiftlang:main Jun 3, 2024
@ahoppen ahoppen deleted the dynamic-cursor-info-on-decl branch June 3, 2024 16:37
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Jun 17, 2024
…hain does not mark overridable function declarations as dynamic

This test requires swiftlang/swift#74080 and should be skipped if the host toolchain does not have that change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants